package sz.com.postoffice.jxyzwgcase.service.impl;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import sz.com.postoffice.jxyzwgcase.dao.BaseDao;
import sz.com.postoffice.jxyzwgcase.dao.master.DailyIncomeDao;
import sz.com.postoffice.jxyzwgcase.pojo.DailyIncome;
import sz.com.postoffice.jxyzwgcase.pojo.DailyIncomeSummary;
import sz.com.postoffice.jxyzwgcase.pojo.MonthPlan;
import sz.com.postoffice.jxyzwgcase.service.DailyIncomeService;
import sz.com.postoffice.jxyzwgcase.service.DailyIncomeSummaryService;
import sz.com.postoffice.jxyzwgcase.service.MonthPlanService;

import javax.annotation.Resource;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

/**
 * @ClassName DailyIncomeServcieImpl
 * @Deacription 日收入逻辑处理层
 * @Author jmx
 * @Date 2020/11/12 16:16
 * @Version 1.0
 **/
@Service
@Slf4j
public class DailyIncomeServcieImpl extends BaseServiceImpl<DailyIncome> implements DailyIncomeService {
    @Resource
    private DailyIncomeDao dailyIncomeDao;
    @Override
    protected BaseDao<DailyIncome> getMapper() {
        return this.dailyIncomeDao;
    }
    @Autowired
    private MonthPlanService monthPlanService;
    @Autowired
    private DailyIncomeSummaryService dailyIncomeSummaryService;

    @Override
    public Integer getIntegerSum(String fieldName, String userCode, String startTime, String endTime) {
        return dailyIncomeDao.sumIntegerField(fieldName, userCode, startTime, endTime);
    }

    @Override
    public Double getDoubleSum(String fieldName, String userCode, String startTime, String endTime) {
        return dailyIncomeDao.sumDoubleField(fieldName, userCode, startTime, endTime);
    }



}
